/////////////////////////////////////////////////////
//Vejares - Varieties of state-building - Figure 11//
/////////////////////////////////////////////////////

tsset year dcode

generate pubemppc = pubemp/totalpop
label variable pubemppc "Bureaucrats per capita"

generate milpc = military/totalpop
label variable milpc "Military and Police per capita"

generate engpc = engineers/totalpop
label variable engpc "Engineers per capita"


//Araucania bureaucrats//
bysort year: egen araubpc = total(pubemppc) if pcode == 5 | pcode == 16 | pcode == 17 | pcode == 23 | pcode == 24
label variable araubpc "Bureaucrats"

//Araucania Military//
bysort year: egen araumpc = total(milpc) if pcode == 5 | pcode == 16 | pcode == 17 | pcode == 23 | pcode == 24
label variable araumpc "Military and Police"

//Araucania Engineers//
bysort year: egen arauepc = total(engpc) if pcode == 5 | pcode == 16 | pcode == 17 | pcode == 23 | pcode == 24
label variable arauepc "Engineers"

**Araucania figures**
line araubpc year, xlabel(1865(10)1895)  xtitle("") saving(araubur, replace)
line araumpc year, xlabel(1865(10)1895) ylabel(0(0.04)0.2) xtitle("") saving(araumil, replace)
line arauepc year, xlabel(1865(10)1895) ylabel(0(0.001)0.004) xtitle("") saving(araueng, replace)

grc1leg araubur.gph araumil.gph araueng.gph


///////////////////////////////////////////////////////
